#include <iostream>
using namespace std;

typedef int (*pfunc) (int, int);

int sumar(int a, int b)
{
	int c = a + b;
	return c;
}

int restar(int a, int b)
{
	int c = a - b;
	return c;
}

int main ()
{
	pfunc p = 0;

	int primer;
	int segund;
	int select;
	int result;

	cout << "Hey, gimmie a number!" << endl;
	cin >> primer;
	cout << "Cool, how bout another one?" << endl;
	cin >> segund;

	cout << "What do you want me do to with em?\n(1)Add\n(2)Substract" << endl;
	cin >> select;

	if (select == 1)
	{
		p = &sumar;
	}
	else
	{
		p = &restar;
	}

	result = p(primer, segund);

	cout << "Here's your result: " << result << endl;
}